package flash.filesystem;

extern class File extends flash.net.FileReference {
	var downloaded : Bool;
	var exists(default,null) : Bool;
	var icon(default,null) : flash.desktop.Icon;
	var isDirectory(default,null) : Bool;
	var isHidden(default,null) : Bool;
	var isPackage(default,null) : Bool;
	var isSymbolicLink(default,null) : Bool;
	var nativePath : String;
	var parent(default,null) : File;
	var spaceAvailable(default,null) : Float;
	var url : String;
	function new(?path : String) : Void;
	function browseForDirectory(title : String) : Void;
	function browseForOpen(title : String, ?typeFilter : Array<flash.net.FileFilter >) : Void;
	function browseForOpenMultiple(title : String, ?typeFilter : Array<flash.net.FileFilter >) : Void;
	function browseForSave(title : String) : Void;
	function canonicalize() : Void;
	function clone() : File;
	function copyTo(newLocation : flash.net.FileReference, overwrite : Bool=false) : Void;
	function copyToAsync(newLocation : flash.net.FileReference, overwrite : Bool=false) : Void;
	function createDirectory() : Void;
	function deleteDirectory(deleteDirectoryContents : Bool=false) : Void;
	function deleteDirectoryAsync(deleteDirectoryContents : Bool=false) : Void;
	function deleteFile() : Void;
	function deleteFileAsync() : Void;
	function getDirectoryListing() : Array<File>;
	function getDirectoryListingAsync() : Void;
	function getRelativePath(ref : flash.net.FileReference, useDotDot : Bool=false) : String;
	function moveTo(newLocation : flash.net.FileReference, overwrite : Bool=false) : Void;
	function moveToAsync(newLocation : flash.net.FileReference, overwrite : Bool=false) : Void;
	function moveToTrash() : Void;
	function moveToTrashAsync() : Void;
	function openWithDefaultApplication() : Void;
	function resolvePath(path : String) : File;
	static var applicationDirectory(default,null) : File;
	static var applicationStorageDirectory(default,null) : File;
	static var desktopDirectory(default,null) : File;
	static var documentsDirectory(default,null) : File;
	static var lineEnding(default,null) : String;
	static var separator(default,null) : String;
	static var systemCharset(default,null) : String;
	static var userDirectory(default,null) : File;
	static function createTempDirectory() : File;
	static function createTempFile() : File;
	static function getRootDirectories() : Array<File>;
}
